using B.S.Domain.审计字段;
using System.ComponentModel.DataAnnotations;

namespace B.S.Domain.AICustomerService
{
    /// <summary>
    /// AI客服知识库
    /// </summary>
    public class AIKnowledgeBase : BaseModel
    {
        /// <summary>
        /// 知识库ID
        /// </summary>
        public int KnowledgeId { get; set; }

        /// <summary>
        /// 问题标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 问题内容/关键词
        /// </summary>
        public string Question { get; set; } = string.Empty;

        /// <summary>
        /// 标准答案
        /// </summary>
        public string Answer { get; set; } = string.Empty;

        /// <summary>
        /// 问题分类
        /// </summary>
        public string Category { get; set; } = string.Empty;

        /// <summary>
        /// 问题标签（多个标签用逗号分隔）
        /// </summary>
        public string? Tags { get; set; }

        /// <summary>
        /// 优先级（1-5，5最高）
        /// </summary>
        public int Priority { get; set; } = 1;

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; } = true;

        /// <summary>
        /// 使用次数
        /// </summary>
        public int UsageCount { get; set; } = 0;

        /// <summary>
        /// 匹配度阈值（0-1）
        /// </summary>
        public decimal MatchThreshold { get; set; } = 0.7m;

        /// <summary>
        /// 相关链接
        /// </summary>
        public string? RelatedLinks { get; set; }

        /// <summary>
        /// 附件路径
        /// </summary>
        public string? AttachmentPath { get; set; }

        /// <summary>
        /// 最后使用时间
        /// </summary>
        public DateTime? LastUsedTime { get; set; }
    }
}
